package com.jiahao.material.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiahao.material.entity.Delivery;
import com.jiahao.material.entity.Warehouseing;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DeliveryMapper extends BaseMapper<Delivery> {

    @Results(id = "deliveryMap",value = {
            @Result(id = true,column = "id",property = "id"),
            @Result(column = "dcode",property = "dcode"),
            @Result(column = "customerId",property = "customerId"),
            @Result(column = "materialId",property = "materialId"),
            @Result(column = "warehouseId",property = "warehouseId"),
            @Result(column = "count",property = "count"),
            @Result(column = "manager",property = "manager"),
            @Result(column = "remarks",property = "remarks"),
            @Result(column = "createTime",property = "createTime"),
            @Result(column = "updateTime",property = "updateTime"),
            @Result(column = "status",property = "status"),
    })
    @Select("select * from delivery where customerId = #{cid}")
    public List<Delivery> getByCid(String cid);
}
